package com.fcscs.cservice.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.fcscs.core.dao.Dao;
import com.fcscs.cservice.domain.BillOption;
import com.fcscs.cservice.domain.ChargeType;
import com.fcscs.cservice.domain.TransactionType;
import com.fcscs.cservice.domain.model.BillOptionView;
import com.fcscs.cservice.domain.model.ChargeCategoryView;
import com.fcscs.cservice.domain.model.ChargeTypeView;
import com.fcscs.cservice.domain.model.TransactionTypeView;
@Repository
public interface InRoomConfDao extends Dao {

	//TODO InRoomConfigurationView

	List<TransactionType> getTransactionTypeList(long orgId, long propId);
	
	List<TransactionTypeView> getTransactionTypeViewList(long orgId, long propId); //used by web service
	
	TransactionType createTransactionType(TransactionType txType);
	
	TransactionType saveTransactionType(TransactionType txType);
	
	boolean deleteTransactionType(TransactionType txType);
	
	boolean permDeleteTransactionType(TransactionType txType);
	
	boolean isTransactionTypeTaken(long orgId, long propId, String code, Long id);

	List<ChargeType> getChargeTypeList(long orgId, long propId);

	List<ChargeTypeView> getChargeTypeViewList(long orgId, long propId); //used by web service

	ChargeType createChargeType(ChargeType chargeType);
	
	ChargeType saveChargeType(ChargeType chargeType);
	
	boolean deleteChargeType(ChargeType chargeType);
	
	boolean permDeleteChargeType(ChargeType chargeType);
	
	boolean isChargeTypeTaken(long orgId, long propId, String code, Long id);
	
	//TODO add a new model for GWT
	List<ChargeCategoryView> getChargeCategoryViewList(long orgId, long propId);

	ChargeCategoryView createChargeCategoryView(long orgId, long propId, ChargeCategoryView chargeCategory);
	
	ChargeCategoryView saveChargeCategoryView(long orgId, long propId, ChargeCategoryView chargeCategory);
	
	boolean deleteChargeCategoryView(ChargeCategoryView chargeCategory);
	
	boolean permDeleteChargeCategory(ChargeCategoryView chargeCategory);
	
	boolean isChargeCategoryTaken(long orgId, long propId, String code, Long id);

	List<BillOption> getBillOptionList(long orgId, long propId);

	List<BillOptionView> getBillOptionViewList(long orgId, long propId); //used by web service, get current version
	
//	List<BillOption> saveBillOptionList(List<BillOption> boList); //used to save display order

	BillOption createBillOption(BillOption bo);

	BillOption saveBillOption(BillOption bo);
	
	BillOption getBillOption(long id);
	
	boolean deleteBillOption(BillOption bo);

	boolean permDeleteBillOption(BillOption bo);

	boolean isBillOptionTaken(long orgId, long propId, String name, Long id);
}
